<?php

namespace app\common\logic;

use app\common\model\course\Order;
use think\exception\ValidateException;


/**
 * 统计热门课程
 */
class CourseOrder
{

    public function __construct()
    {
        $this->model = new Order();
    }


    public function save($data) {
        $arr = array_merge($data, [
            'user_id' => UID
        ]);

        $res = $this->model->data($arr)->save();

        return $res;
    }

}
